

enum AppEnvEnum {
  dev,
  release
}

class APPEnv {

  var _envType = AppEnvEnum.dev;
  set envType(AppEnvEnum env) {
    _envType = env;
    resetEnv();
  }

  AppEnvEnum get envType {
    return _envType;
  }

  var javaUrl = "";
  var forwarderUrl = "";
  var exhibitionUrl = "";
  var shopUrl = "";
  late var isDev = envType == AppEnvEnum.dev;
  late var isRelease = envType == AppEnvEnum.release;

  void resetEnv() {
    if (envType == AppEnvEnum.dev) {
      // 开发 国内
      javaUrl = "http://192.168.1.92:8080";
      forwarderUrl = "https://test.gluz.com.cn/#";
      exhibitionUrl = "https://online.gluz.com.cn/#";
      shopUrl = "https://shop.gluz.com.cn/ts/#";
    } else {
      // 正式 国内
      javaUrl = "http://114.55.150.0:8080";
      forwarderUrl = "https://test.gluz.com.cn/#";
      exhibitionUrl = "https://online.gluz.com.cn/#";
      shopUrl = "https://shop.gluz.com.cn/ts/#";
    }
  }

}